x86/spec-ctrl: Drop SPEC_CTRL_{ENTRY_FROM,EXIT_TO}_HVM
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 25 Jan 2022 12:39:31 +0000 (13:39 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 25 Jan 2022 12:39:31 +0000 (13:39 +0100)
commit21d70feed10571543061abeaedd21ce8adc60114
tree56faadc228bb640ea15b16d0f49f89e6b18bc747
parentcc6fe1bb13197ddc79af480c3c74ce6d6ed3ef2c
x86/spec-ctrl: Drop SPEC_CTRL_{ENTRY_FROM,EXIT_TO}_HVM

These were written before Spectre/Meltdown went public, and there was large
uncertainty in how the protections would evolve.  As it turns out, they're
very specific to Intel hardware, and not very suitable for AMD.

Drop the macros, opencoding the relevant subset of functionality, and leaving
grep-fodder to locate the logic.  No change at all for VT-x.

For AMD, the only relevant piece of functionality is DO_OVERWRITE_RSB,
although we will soon be adding (different) logic to handle MSR_SPEC_CTRL.

This has a marginal improvement of removing an unconditional pile of long-nops
from the vmentry/exit path.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
master commit: 95b13fa43e0753b7514bef13abe28253e8614f62
master date: 2022-01-20 16:32:11 +0000
xen/arch/x86/hvm/svm/entry.S
xen/arch/x86/hvm/vmx/entry.S
xen/include/asm-x86/spec_ctrl_asm.h